package com.kadron.order;

import java.io.Serializable;

import com.kadron.entity.KItemImage;
import com.kadron.entity.OrderItem;

public class OrderItemData implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -6077402693693967759L;

	private OrderItem orderItem;
	private KItemImage img;

	private OrderItemData() {
		super();
	}
	
	public OrderItemData(OrderItem orderItem, KItemImage img) {
		this();
		this.orderItem = orderItem;
		this.img = img;
	}

	public OrderItem getOrderItem() {
		return orderItem;
	}

	public void setOrderItem(OrderItem orderItem) {
		this.orderItem = orderItem;
	}

	public KItemImage getImg() {
		return img;
	}

	public void setImg(KItemImage img) {
		this.img = img;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((orderItem == null) ? 0 : orderItem.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OrderItemData other = (OrderItemData) obj;
		if (orderItem == null) {
			if (other.orderItem != null)
				return false;
		} else if (!orderItem.equals(other.orderItem))
			return false;
		return true;
	}
}
